{extend name="../../admin/view/public/system"}

{block name='title'}编辑角色权限-系统管理-{$account['name']}{/block}

{block name='content'}

<div class="page-header">
    <span>当前位置：<span class="text-primary"> {if !empty($item['id'])}编辑{else}添加{/if}角色 <small>{if !empty($item['id'])}修改【{$item['rolename']}】{/if}</small></span></span>
</div>
<div class="page-content">
    <div class="page-sub-toolbar">
         <span class=''>
             <a class="btn btn-primary btn-sm" href="{:webUrl('perm/rolePost')}"><i class="icon icon-plus"></i> 添加新角色</a>
            <a class='btn btn-default btn-sm' href="{:webUrl('perm/user')}">&nbsp;&nbsp;操作员管理&nbsp;&nbsp;</a>
        </span>
    </div>
    <form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data">
        <input type="hidden" name="id" value="{$item['id']}" />

        <div class="form-group">
            <label class="col-lg control-label must">角色</label>
            <div class="col-sm-9 col-xs-12">
                <input type="text" name="rolename" class="form-control" value="{$item['rolename']}" data-rule-required="true" />
                <!--<div class='form-control-static'>{$item['rolename']}</div>-->
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">状态</label>
            <div class="col-sm-9 col-xs-12">
                <label class='radio-inline'>
                    <input type='radio' name='status' value='1' {if $item['status']==1}checked{/if} /> 启用
                </label>
                <label class='radio-inline'>
                    <input type='radio' name='status' value='0' {if $item['status']==0}checked{/if} /> 禁用
                </label>
                <span class="help-block">如果禁用，则当前角色的操作员全部会禁止使用</span>
                <!--<div class='form-control-static'>{if $item['status']==1}启用{else}禁用{/if}</div>-->
            </div>
        </div>

        {include file="perm/perms" /}

        <div class="form-group"></div>
        <div class="form-group">
            <label class="col-lg control-label"></label>
            <div class="col-sm-9 col-xs-12">
                <input type="submit" value="提交" class="btn btn-primary"  />
                <input type="button" name="back" onclick='history.back()' style='margin-left:10px;' value="返回列表" class="btn btn-default" />
            </div>
        </div>
    </form>
</div>

<script language='javascript'>
    /*如果修改权限则开启*/
    // $(function(){
    //     $(':checkbox').attr('disabled',true);
    // })
</script>
{/block}